''' app  learning_logs的url'''
from django.conf.urls import url
from .import views

urlpatterns = [
	#定义app主页
	url(r'^$', views.index, name='index'),         # views.index表示此网址对应的是views下的index
	#显示所有主题的url
	url(r'^topics$', views.topics, name='topics'), #定义url规则：以topics开头，'/'结尾，把请求交给位于views下的topics的函数进行处理。
	#特定主题的详细页面
	url(r'^topics/(?P<topic_id>\d+)/$', views.topic, name='topic'),
	#用于添加新的主题的网页
    url(r'^new_topic/$', views.new_topic, name='new_topic'),
    url(r'^new_item/(?P<topic_id>\d+)/', views.new_item, name='new_item'),
    url(r'edit_item/(?P<item_id>\d+)/$', views.edit_item, name='edit_item'),
]